import { axios } from '@/utils/request'

export function getRecallTaskList (params) {
    return axios({
        url: 'recall/task',
        method: 'get',
        params
    })
}

export function getRecallHistoryList (params) {
    return axios({
        url: 'recall/history',
        method: 'get',
        params
    })
}

export function getRecallList (params) {
    return axios({
        url: 'recall',
        method: 'get',
        params
    })
}

export function getRecallReportList (params) {
    return axios({
        url: 'recall/report',
        method: 'get',
        params
    })
}

export function getRecallAccount (params) {
    return axios({
        url: 'recall/account',
        method: 'get',
        params
    })
}

export function addRecallAccount (data) {
    return axios({
        url: 'recall/account',
        method: 'post',
        data
    })
}

export function updateRecallAccount (id, data) {
    return axios({
        url: `recall/account/${ id }`,
        method: 'put',
        data
    })
}

export function delRecallAccount (id) {
    return axios({
        url: `recall/account/${ id }`,
        method: 'delete'
    })
}

export function getRecallDetail (id, params) {
    return axios({
        url: `recall/${ id }`,
        method: 'get',
        params
    })
}

export function handleRecallTask (id, data) {
    return axios({
        url: `recall/${ id }`,
        method: 'post',
        data
    })
}

export function assignTask (data) {
    return axios({
        url: 'recall/assign_task',
        method: 'post',
        data
    })
}

export function getAchievement (params) {
    return axios({
        url: 'recall/achievement',
        method: 'get',
        params
    })
}
